<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>ostream</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Beast">
<link rel="up" href="../ref.html" title="This Page Intentionally Left Blank 2/2">
<link rel="prev" href="boost__beast__operator_gt__eq_/overload3.html" title="operator&gt;= (3 of 3 overloads)">
<link rel="next" href="boost__beast__read_size.html" title="read_size">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost__beast__operator_gt__eq_/overload3.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__read_size.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="beast.ref.boost__beast__ostream"></a><a class="link" href="boost__beast__ostream.html" title="ostream">ostream</a>
</h4></div></div></div>
<p>
        <a class="indexterm" name="idp124924432"></a>
Return an output stream that formats values into a <span class="bold"><strong>DynamicBuffer</strong></span>.
      </p>
<h5>
<a name="beast.ref.boost__beast__ostream.h0"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__ostream.synopsis"></a></span><a class="link" href="boost__beast__ostream.html#beast.ref.boost__beast__ostream.synopsis">Synopsis</a>
      </h5>
<p>
        Defined in header <code class="literal">&lt;<a href="../../../../../../boost/beast/core/ostream.hpp" target="_top">boost/beast/core/ostream.hpp</a>&gt;</code>
      </p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
    <span class="keyword">class</span> <a class="link" href="../concepts/DynamicBuffer.html" title="DynamicBuffer"><span class="bold"><strong>DynamicBuffer</strong></span></a><span class="special">&gt;</span>
<span class="emphasis"><em>implementation-defined</em></span>
<span class="identifier">ostream</span><span class="special">(</span>
    <span class="identifier">DynamicBuffer</span><span class="special">&amp;</span> <span class="identifier">buffer</span><span class="special">);</span>
</pre>
<h5>
<a name="beast.ref.boost__beast__ostream.h1"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__ostream.description"></a></span><a class="link" href="boost__beast__ostream.html#beast.ref.boost__beast__ostream.description">Description</a>
      </h5>
<p>
        This function wraps the caller provided <span class="bold"><strong>DynamicBuffer</strong></span>
        into a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span></code> derived class, to allow <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;&lt;</span></code>
        stream style formatting operations.
      </p>
<h5>
<a name="beast.ref.boost__beast__ostream.h2"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__ostream.example"></a></span><a class="link" href="boost__beast__ostream.html#beast.ref.boost__beast__ostream.example">Example</a>
      </h5>
<pre class="programlisting"><span class="identifier">ostream</span><span class="special">(</span><span class="identifier">buffer</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="string">"Hello, world!"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
</pre>
<h5>
<a name="beast.ref.boost__beast__ostream.h3"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__ostream.remarks"></a></span><a class="link" href="boost__beast__ostream.html#beast.ref.boost__beast__ostream.remarks">Remarks</a>
      </h5>
<p>
        Calling members of the underlying buffer before the output stream is destroyed
        results in undefined behavior.
      </p>
<h5>
<a name="beast.ref.boost__beast__ostream.h4"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__ostream.parameters"></a></span><a class="link" href="boost__beast__ostream.html#beast.ref.boost__beast__ostream.parameters">Parameters</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody><tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">buffer</span></code>
                </p>
              </td>
<td>
                <p>
                  An object meeting the requirements of DynamicBuffer into which
                  the formatted output will be placed.
                </p>
              </td>
</tr></tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__ostream.h5"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__ostream.return_value"></a></span><a class="link" href="boost__beast__ostream.html#beast.ref.boost__beast__ostream.return_value">Return
        Value</a>
      </h5>
<p>
        An object derived from <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span></code>
        which redirects output The wrapped dynamic buffer is not modified, a copy
        is made instead. Ownership of the underlying memory is not transferred, the
        application is still responsible for managing its lifetime. The caller is
        responsible for ensuring the dynamic buffer is not destroyed for the lifetime
        of the output stream.
      </p>
<p>
        Convenience header <code class="literal">&lt;<a href="../../../../../../boost/beast/core.hpp" target="_top">boost/beast/core.hpp</a>&gt;</code>
      </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2016, 2017 Vinnie Falco<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost__beast__operator_gt__eq_/overload3.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__read_size.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
